using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SocketServer
{
    public partial class FrmServer : Form
    {
        public FrmServer()
        {
            InitializeComponent();
        }

        TCPLibrary.TCPSvrManager m_tcp_server = new TCPLibrary.TCPSvrManager(8000, "Data Source=rfid204;User ID=rfid;Password=rfid;");
        System.Threading.Thread t_thd = null;
        private void FrmServer_Load(object sender, EventArgs e)
        {
            t_thd = new System.Threading.Thread(m_tcp_server.StartListen);
            t_thd.Start();

      

        }

        private void FrmServer_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (t_thd != null)
                t_thd.Abort();
        }
    }
}